﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MyExcelAddIn2003.Core;

namespace MyExcelAddIn2003.Weight
{
    public partial class YBSetForm : Form
    {
        public YBSetForm()
        {
            InitializeComponent();
            checkBox_Zore.Checked = Utility.isZore;
            checkBox_Stable.Checked = Utility.isStable;
        }

        private void checkBox_Zore_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox_Zore.Checked == true)
            {
                Utility.isZore = true;
            }
            else
            {
                Utility.isStable = false;
            }
        }

        private void checkBox_Stable_CheckedChanged(object sender, EventArgs e)
        {
            if(checkBox_Stable.Checked==true)
            {
                Utility.isStable = true;
            }else
            {
                Utility.isStable = false;
            }
        }

        private void checkBox_RealShow_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox_RealShow.Checked == true)
            {
                 WeightFrm.GetInstance.ShowRealMeterForm();
            }
            else
            {
                RealMeterFrm rmf = RealMeterFrm.Instance();
                rmf.Close();
            }
        }
    }
}
